#define _CRT_SECURE_NO_WARNING
#include"RBTree.h"

void Test1()
{
	//srand((unsigned int)time(nullptr));
	lz::RBTree<int,pair<int,int>> t1;
	t1.insert(make_pair<int, int>(1, 2));
	lz::RBTree<int,int> t2;

	t2.insert(1);
	t2.find(1);
	//int i = 1000;
	//while (i)
	//{
	//	t1.insert(1);
	//	i--;
	//}
	//t1.insert(make_pair<int, int>(1, 1));
	//t1.insert(make_pair<int, int>(3, 2));
	//t1.insert(make_pair<int, int>(2, 3));
	//t1.insert(make_pair<int, int>(4, 4));
	//t1.insert(make_pair<int, int>(8, 4));
	//t1.insert(make_pair<int, int>(6, 4));
	//t1.insert(make_pair<int, int>(7, 4));
	//t1.insert(make_pair<int, int>(12, 4));
//	lz::RBTree<int, int> t2;
	//t2 = t1;
	//t2[20] = 12;
/*	t2.deleteNode(t2.find(2));
	t2.deleteNode(t2.find(1));
	t2.deleteNode(t2.find(3));
	t2.deleteNode(t2.find(4));
	t2.deleteNode(t2.find(6));
	t2.deleteNode(t2.find(7));
	t2.deleteNode(t2.find(8));
	t2.deleteNode(t2.find(12));
	t2.deleteNode(t2.find(20))*/;
	//while (i != 500)
	//{
	//	i++;
	//	t2.deleteNode(t2.find(i));

	//}
	t1.InOder();
	cout << t1.IsRBTree() << endl;
	t2.InOder();
}

//int main()
//{
//	Test1();
//
//	return 0;
//}